//
// Created by Tan Ke on 2024/1/13.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

int removeDuplicates(int* nums, int numsSize)
{
    int* recordMap = (int*)malloc(sizeof(int) * numsSize);
    int recordMapLen = 0;

    for (int i = 0; i < numsSize; i ++) {
        bool found = false;
        for (int m = 0; m < recordMapLen; m ++) {
            if (recordMap[m] == nums[i]) {
                found = true;
                break;
            }
        }
        if (found == false) {
            recordMap[recordMapLen] = nums[i];
            recordMapLen += 1;
        }
    }

    for (int i = 0; i < recordMapLen; i ++) {
        nums[i] = recordMap[i];
    }

    return recordMapLen;
}

int main(void)
{
    return 0;
}
